package com.firebird.app.fekpsl.mvp.exam

import com.firebird.app.fekpsl.base.BaseModel
import com.firebird.app.fekpsl.bean.BlankFillingQuestion
import com.firebird.app.fekpsl.bean.HttpResult
import com.firebird.app.fekpsl.bean.MultipleAnswer
import com.firebird.app.fekpsl.bean.SingleAnswer
import com.firebird.app.fekpsl.bean.TrueFalseQuestion
import com.firebird.app.fekpsl.http.RetrofitHelper
import io.reactivex.Observable

/**
 * Created by firebird on 2018/4/21.
 */
class ExamModel : BaseModel(), ExamContract.Model {

    override fun getSingleAnswerList(subjectId: Int): Observable<HttpResult<List<SingleAnswer>>> {
        return RetrofitHelper.examService.getSingleAnswerList(subjectId)
    }
    override fun getMultipleAnswerList(subjectId: Int): Observable<HttpResult<List<MultipleAnswer>>> {
        return RetrofitHelper.examService.getMultipleAnswerList(subjectId)
    }
    override fun getTrueFalseQuestionList(subjectId: Int): Observable<HttpResult<List<TrueFalseQuestion>>> {
        return RetrofitHelper.examService.getTrueFalseQuestionList(subjectId)
    }
    override fun getBlankFillingQuestionList(subjectId: Int): Observable<HttpResult<List<BlankFillingQuestion>>> {
        return RetrofitHelper.examService.getBlankFillingQuestionList(subjectId)
    }
}